import request from "@/utils/request";


/**
 * 升级合伙人需要 分享新用户人数
 * @param params
 * @returns {Promise<*>}
 */
export function shareNumApi(params) {
  return request.get("/config/spread/num");
}

/**
 * 首页推广是否显示
 * @param params
 * @returns {Promise<*>}
 */
export function showShareApi(params) {
  return request.get("/config/spread/status");
}

/**
 * 可免费查询次数 新接口 暂时没用  需修改之前的接口
 * @param params
 * @returns {Promise<*>}
 * @constructor
 */
export function SearchNumApi(params) {
  return request.get("/config/report/free/limit");
}

/**
 * 分享朋友
 * @param params
 * @returns {Promise<*>}
 */
export function shareToFriend(params) {



  let ENVLIST = ["H5-dev", "H5-test", "H5-uat"];
  let H5_APP_ID = ENVLIST.includes(process.env.ENV_TYPE)
    ? "wx3843eed9287d8daa"
    : "wxa597db96950c5e5d";
  return request.get(
    `/wx/mp/jsapi/${H5_APP_ID}/getJsapiTicket?url=${params.url}`
  );
}
